package Servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class CServlet extends HttpServlet{

	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws IOException {

		PrintWriter out = response.getWriter();
		String title = "test2_result";

		int radius = Integer.valueOf(request.getParameter("radius"));

		double PI = 3.14;
		out.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//cn\">"+
			    "<html>" +
				"<head>" +
				"<title>" + title+ "</title>" +
				"</head>" +
				"<body>"+
				"<h1 align=\"center\">" + title + "</h1>" + "<ul>"+
				"<li content='utf-8'><b>The Perimeter:</b>" + (2*radius* PI)+
				"<li content='utf-8'><b>The Square:</b>" + (PI *radius*radius)+"</ul>" +
				"</body>" +
				"</html>"
		);


	}

}
